<?php
if(!defined('PATH')) exit();
?>

<h3>Welcome to the official store of <?=$this->config['server']['name']?>!</h3>
You are currently browsing the items list.
<br /><br />
<?php
if (LOGGED) {
	$this->archez->showMsg('Your account premium points amount is: &nbsp; <span style="font-size:14px;">' . $account->getPremiumPoints() . '</span>', 'Premium Points');
	echo '<br />';
} else if(!LOGGED){
	$this->archez->showMsg('<a href="' .PATH. '/account/login/store">Log in</a> to see your account premium points.', 'Information');
	echo '<br />';
}

if ($storeItems->countAll() != 0) {
	$this->archez->showMsg('In order to see the item picture, description and even more information the store has about the selected item, click on its name.', 'hint');
	echo '<br />';
}
?>

<table border="0" cellpadding="8" cellspacing="1" width="100%">
<tr class="head"><td colspan="4"><b>Account Modifications</b></td></tr>
<tr><td width="50%"><b>Name</b></td><td width="30%"><b>Price</b></td><td><b>Amount</b></td></tr>
<?php
$storeItems->load(Model_Store::TYPE_PREMMY);
if (!$storeItems->isLoaded()) {
?>
<tr><td colspan="4">Our account modifications database table appears to be empty, sorry.</td></tr>
<?php
}
while ($row = $storeItems->next()) {
?>
		<tr><td><a href="<?=PATH?>/store/check/<?=$row->id?>"><?=ucwords($row->name)?></a></td><td><?=$row->price . ' ' . $row->unit?></td><td><?=$row->amount?> days</td></tr>
<?php
}
?>
</table>
<br />
<table border="0" cellpadding="8" cellspacing="1" width="100%">
<tr class="head"><td colspan="4"><b>Character Add-ons</b></td></tr>
<tr><td width="50%"><b>Name</b></td><td width="30%"><b>Price</b></td><td><b>Amount</b></td></tr>
<?php
$storeItems->load(Model_Store::TYPE_ITEM);
if (!$storeItems->isLoaded()) {
?>
<tr><td colspan="4">Our character add-ons database table appears to be empty, sorry.</td></tr>
<?php
}
while ($row = $storeItems->next()) {
?>
		<tr><td><a href="<?=PATH?>/store/check/<?=$row->id?>"><?=ucwords($row->name)?></a></td><td><?=$row->price . ' ' . $row->unit?></td><td><?=$row->amount?>x</td></tr>
<?php
}
?>
</table>
<?php
$this->archez->loadInjections('store/browse', get_defined_vars());
?>